#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s1, s2, ret = "";
	getline(cin, s1);
	getline(cin, s2);
	for (auto& e : s1)
	{
		if (s2.find(e) == s2.npos)
		{
			ret += e;
		}
	}
	cout << ret;
	return 0;
}